From e46a729b18af85b4dd040578643f7fa430b22a48 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Mon, 7 Mar 2016 20:23:39 -0600 Subject: [PATCH] libxl: ensure var is inited in libxl__domain_firmware Some versions of GCC complain that the 'firmware' variable can be used uninitialized. It looks like the switch inside of the else case is just confusing GCC. Signed-off-by: Doug Goldstein Acked-by: Wei Liu --- tools/libxl/libxl_dom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 664adadced..b825b988c7 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -867,7 +867,7 @@ static int libxl__domain_firmware(libxl__gc *gc, struct xc_dom_image *dom) { libxl_ctx *ctx = libxl__gc_owner(gc); - const char *firmware; + const char *firmware = NULL; int e, rc; int datalen = 0; void *data; -- 2.30.2